import { editorBlockSelectProp, editorBlockColorProp, editorBlockInputProp } from '../../utils/registerComponentTool'

export default {
  label: '文本',
  preview: () => '预览文本',
  render: ({ props }) => <span style={{ color: props.color }}>{props.text || '我是文本'}</span>,
  key: 'text',
  props: {
    text: editorBlockInputProp('按钮内容'),
    color: editorBlockColorProp('字体颜色'),
    size: editorBlockSelectProp('字体大小', [
      { label: '14px', value: '14px' },
      { label: '20px', value: '20px' },
      { label: '24px', value: '24px' },
      { label: '34px', value: '34px' },
    ])
  }
}